This application claims the priority of German patent document 102 61 174.2, filed Dec. 20, 2002 (PCT International Application No. PCT/EP2003/012986, filed Nov. 20, 2003), the disclosure of which is expressly incorporated by reference herein.
The present invention is directed to a method and apparatus for automatic address allocation by control devices connected to a bus system in a vehicle, where the control devices interchange data using transmission/reception units via a common data bus line, and the control devices simultaneously access the data sent using the common data bus line.
In order to allow communication between control devices in data bus systems, the control devices must have an individual address, which allows the control devices (or “subscribers”) in the data bus system to interchange messages and data with one another. In particular, it is possible to send messages directly to any subscribers in the data bus system, and it is normally also possible to ascertain the sender of a message.
In address setting or allocation, it is necessary to ensure that the correct addresses are allocated to the appropriate subscribers. In particular, in order to avoid interference, the same addresses must not be allocated multiple times to different subscribers. It should be a simple matter to handle the incorporation of a further subscriber into the data bus system and the associated address expansion.
A “Daisy Chain” are frequently used in data bus systems on vehicle in order to figure the control devices connected to the data bus system, particularly in order to make address settings.
A “daisy chain” connection is an individual point-to-point data line connection which is a series or ring connections between a central control unit (“the “master”) and the other subscribers “(the “slaves”), in the “daisy chain” connection. In a “daisy chain” connection, a signal emitted by the central processing unit on the data line reaches only the first subscriber, is forwarded therefrom to the next subscriber, which in turn forwards the signal to the next subscriber etc. All subscribers can receive identical signals when the signals are not altered upon forwarding. In addition, in contrast to other bus systems, any subscriber in the chain can change one or more signals before it forwards the signal. The time-delayed forwarding allows a plurality of messages to be forwarded on the “daisy chain” connection, for example the second subscriber can forward an electrical signal to the third subscriber while the master is already sending the next signal to the first subscriber.
In a “daisy chain” connection, the signal return path generally runs directly from the last slave in the chain to the master. Unidirectional communication is permitted on the signal return path. Alternatively, the signal return path may be terminated at the last subscriber by means of a resistor, in which case the data lines should then be in bidirectional form.
Subscribers in a “daisy chain” connection have at least two interfaces for data interchange or for communication via the bus system. One of the two interfaces (in particular, the first interface) is in the form of a communication interface for receiving data from a subscriber which is connected upstream in the “daisy chain” connection, while the second interface is a communication interface for connection to a downstream subscriber in the bus system. If the “daisy chain” connection is bidirectional, the communication interfaces likewise need to be of bidirectional orientation.
A bus system which is designed using a “daisy chain” connection can only provide communication from master to slave or vice versa. There is no provision for actual communication between the slaves (that is, the subscribers in the bus system).
The fact that in a “daisy chain” connection the signals are forwarded from subscriber to subscriber in sections means that the “daisy chain” connection is often called a “non-jointly used connection”. In contrast, “jointly used connections” are those which can be accessed by the subscribers with equal authority and where all subscribers can receive data simultaneously on account of the electrical or optical connection to the data line, as is implemented in the Control Area Network (CAN) protocol, for example.
Often, the address configuration for the subscribers in an arbitrary bus system is obtained using a (sub)bus system, which is constructed from a “daisy chain” connection (that is, a non-jointly used connection). Data communication between the subscribers in the data bus system takes place using an additional, jointly used connection which allows individual communication with equal authorization on account of the actual data protocol between the subscribers.
German patent document DE 100 38 783 discloses a method and an apparatus for automatic address allocation to a plurality of subscribers in a bus system using “daisy chain” connection. Upon receipt by the first interface of an unmistakable, explicit command from the master in a data packet for address allocation, each slave subscriber stores the part which is to be interpreted as an address in an address memory which can be accessed by the respective subscriber, and forwards the data packet with the same command and an altered address value to a neighboring subscriber via the second interface.
German patent document DE 37 36 081 A1 discloses a method and an apparatus for address setting by subscribers which are connected to a central processing unit via a bus. In addition, the subscribers on the bus are connected in series by means of a “daisy chain” connection coming from the central processing unit. The subscribers' address setting is obtained using the “daisy chain” connection. A signal with a particular binary value on the “daisy chain” connection at the input of the first subscriber causes the latter to pick up an available address on the bus from a data packet produced in the central processing unit and to output the particular binary value to the “daisy chain” connection. The subscriber sends the address picked up to the central processing unit as a response. The method then continues at the neighboring subscriber.
U.S. Pat. No. 5,583,754 and French patent document FR-A-2 214 385 each describe a data bus system of the generic type, with a central control device and periphery components.
German patent document DE196 21 272 A1 discloses an addressing apparatus for a slave station in a serial bus system and a method for addressing a slave station. The slave stations contain a switching apparatus which is coupled into the data line to the downstream slave station in order to interrupt the data line on the basis of a switching signal from the control device.
One object of the present invention is to provide a method and a bus system which optimizes automatic address allocation in a bus system with a common data line.
This and other objects and advantages are achieved by the method and apparatus according to the invention, in which an address allocation period is started by means of a message on the jointly used data bus line. During the address allocation period, the message is taken as a basis for electrically breaking the common data bus line into individual subsections by virtue of the control device which are to be addressed using a respective isolating means. In addition, the control devices which are to be addressed place their respective transmission unit at a transmission potential.
The data line 2 is routed such that a connection is provided between the subscribing control devices 3-6. The data line is thus connected through between the input and output of the control device.
This and other objects and advantages are achieved by the method and apparatus according to the invention, in which an address allocation period is started by means of a message on the jointly used data bus line. During the address allocation period, the message is taken as a basis for electrically breaking the common data bus line into individual subsections by virtue of the control device which are to be addressed using a respective isolating means. In addition, the control devices which are to be addressed place their respective transmission unit at a transmission potential.
Depending on the bus system chosen, the data bus line may be in the form of single-wire, two-wire or multiwire data lines.
References herein to the “simultaneous” reception of data sent on the data bus by means of the control devices does not mean absolutely simultaneous reception, but rather reception in a time interval which covers the propagation of the electromagnetic wave on the data bus line.
One advantage of this arrangement is that a common data bus line is split into individual subsections during the period of address allocation, so that a “daisy chain” connection (particularly a “non-jointly used” connection), topology is obtained between the control devices which are to be addressed as bus subscribers.
Since the common data bus line is used for addressing, no additional data bus line is required between the control devices. In addition, the control devices need not need be equipped with a further bus protocol, such as would be necessary in order to be able to communicate via such an additional data bus line for addressing. Standard control devices, in which the address setting is intended to be performed using the inventive method, therefore need be altered only to a minimal extent.
The method has the particular advantage that it can also be used for bus systems containing subscribers with equal authorization (that is, not a master/slave system as described above). The address allocation merely needs to be initiated by a control device using a signal.
The method according to the invention also has the advantage that, in contrast to known addressing methods, the master can be located at any position in the bus system, rather than at the start or end of the data bus line, as is required with a “daisy chain” connection. The reason for this is that the start signal for address allocation is obtained at a time at which the common connection is available to all control devices.
Since the master can be positioned in the bus system as desired, it is a simple matter to extend the address allocation to other control devices in the existing bus system. For example, when control devices are arranged in series and there is a master at an arbitrary position, the control devices can be incorporated into the address allocation to the right and/or left of the master.
A further advantage is that the method according to the invention can be used in bus systems in which less than all control devices in the bus system are involved in the addressing method. (That is, for example, control devices configured in standard fashion already exist on the bus system). This is ensured, in particular, by virtue of just control devices which are to be addressed being involved in the method.
The method can also be applied when a further control device (which is to be addressed) is added to or removed from the bus system, since all control devices to be addressed are involved in the address allocation.
The method is not limited to bus systems connected in series. Rather, it may also be used on bus systems with a ring structure, in particular.
It is advantageous for the transmission unit in the control device which is to be addressed to turn on and send a signal, because this ensures that there is an electrical parameter for determining whether there is a further control device which is to be addressed on the data bus line.
The address to be allocated is independent of the position of the subscriber in the bus system, since the check to determine whether there is a further downstream control device to be addressed takes place after a time TSG which is individually stipulated for each control device which is to be addressed. This means that the address to be allocated is likewise transmitted to the control device independently of the position of the control device. There is thus no address allocation required, such as rising address, in line with the order of the position of the control devices in the bus system.
One advantage of the invention is that the method can be applied not only in bus systems containing single-wire data lines but also in bus systems with two-wire data lines, since the electrical parameter determined is a differential voltage level at the output to the downstream control device, as is obtained for determining signal transmission in line with the respective bus system on the data bus line.
The method can thus be used in a bus system based on the LIN (Local Interconnect Network) standard. In line with the LIN protocol, the data bus line provided is a single-wire data line for signal or data transmission. The signal transmission or evaluation takes place in the LIN bus by determining the differential voltage level between the LIN or the single-wire data line and the ground potential.
The method may likewise be used in a bus system with a two-wire data line, such as a CAN (Controller Area Network) data bus. For signal evaluation on a CAN bus, the voltage difference between the two data lines is measured, which is evaluated in the method as an electrical parameter.
One advantage of the invention is that in the case of a single-wire data line the electrical parameter measured is the current on the data line at the output to the downstream control device, since current measurement is easy to implement in the control device.
It has advantageously been recognized that if there is a downstream control device which is to be addressed then the data line is closed again, using the isolating means in the particular control device which is to be addressed, and the transmission unit in that particular control device turned off. A control device which is to be addressed thus forwards the address setting option to a further control device which is to be addressed. In this manner, it is possible to ascertain an individual control device for address setting. This step thus optimizes the method.
It is advantageous for the isolating means to be in the form of a switchable connection, such as a switching transistor or a relay or a repeater, which are available at low cost on the market today.
A further advantage of the method is that it may also be used in optical bus systems by using repeaters as the isolating means.
The fact that control devices which are not involved in the addressing do not send any data to the data bus line in the address allocation period prevents the address allocation from being disrupted. In particular, this method allows the address allocation to be limited to the control devices which are to be addressed which are involved.
It has advantageously been recognized that during the address allocation period no control device is able to send a signal for connecting the control devices (that is, for closing the interrupted data line) to all control devices, since the data bus line is partially interrupted, of course. For this reason, the period of address allocation is limited to a time TMAX. The control devices involved in the address allocation restore the common data bus line by reconnecting the interrupted data bus line after the time TMAX, which is known to every control devices involved.
Advantageously, the start signal already contains the address which is to be allocated, which means that no further signal from a control device is needed for the other control device which are to be addressed.
It has advantageously been recognized that address allocation period is produced as part of an addressing cycle and is started repeatedly by means of automatic flow control until an address setting has been made on all control devices which are to be addressed.
The automatic flow control has the advantage that this needs to be performed only once using a control device. After that, the control devices automatically start the period of address allocation again after a particular time TCYC. In this context, TCYC needs to be chosen to be greater than TMAX, since an address allocation period must to be concluded first, before a further period for renewed address allocation is started.
The automatic flow control may also be performed by virtue of a control device repeatedly starting the address allocation period automatically, and accordingly transmitting an address which is to be allocated upon every start signal.
In one embodiment of the invention, the measuring arrangement has means for controlling the isolating means and the transmission/reception unit in the control device in question, the means for control taking the evaluation of the measured signals as a basis for controlling the isolating means and the transmission/reception unit.
One advantage of this arrangement is that, by looping the data bus line through the control device in conjunction with the isolating means contained in the control device, the control device is able to interrupt a common data bus line and also to reconnect it.
A further advantage is that the changes which are to be made can be implemented with minimal cost involvement on standard control devices which are already in use on the market.
Another advantage which has been recognized is that the development of the measuring arrangement has a comparison means which through simple comparison of input signals produces an output signal which is in turn used to control the transmission/reception unit and the isolating means.
Preferably, the comparison means is in the form of a comparator circuit on account of its switching speed.
Other objects, advantages and novel features of the present invention will become apparent from the following detailed description of the invention when considered in conjunction with the accompanying drawings.